#include "Os_JoystickCtrl.h"

#include "app_common.h"
#include "app_adc.h"

/* Os_RockerCtrl entry function */
/* pvParameters contains TaskHandle_t */
void Os_JoystickCtrl_entry(void * pvParameters)
{
	FSP_PARAMETER_NOT_USED(pvParameters);

	/* TODO: add your own code here */
    EventBits_t event_group_bits;
	EventBits_t waiting_eg_bits;
	
	// waiting for initialing
	waiting_eg_bits = EVENT_GROUP_SET_BIT(EVENT_GROUP_0_INIT);
	event_group_bits = xEventGroupWaitBits(event_group_0,     
											waiting_eg_bits,            
											pdFALSE,             // Do not clear event bits    
											pdTRUE,              // waiting all bits setting
											portMAX_DELAY);      // waiting forever 
    (void)event_group_bits;
	
	
	while(1)
	{
		Joystick_RunningEntry();
		
		Disp_Change();
		
		vTaskDelay(20);
	}
}
